import request from '@/utils/request'

// 获取所有会员等级
export const getMemberLevels = () => request.get('/api/members/levels')

// 获取用户会员信息
export const getMemberInfo = () => request.get('/api/members/info')

// 检查并更新用户会员等级
export const checkMemberUpgrade = () => request.post('/api/members/check-upgrade')

// 获取用户升级历史
export const getMemberUpgradeHistory = (params) => request.get('/api/members/upgrade-history', params)

// 计算订单折扣
export const calculateMemberDiscount = (originalAmount) => request.post('/api/members/calculate-discount', { originalAmount })

// 获取会员统计信息
export const getMemberStatistics = () => request.get('/api/members/statistics')